package train48days;

import java.util.Scanner;

public class 剪花布条 {
//    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
//        while (sc.hasNext()){
//            String a= sc.next();
//            String b =sc.next();
//            int count = 0;
//            while (a.contains(b)){
//                a=a.replaceFirst(b," ");
//                count++;
//            }
//            System.out.println(count);
//        }
//    }
//    }
     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
         while (sc.hasNext()){
             String a = sc.next();
             String b = sc.next();
              int count = cut(a,b);
             System.out.println(count);
         }
}

    private static int cut(String a, String b) {
          int n =a.indexOf(b);
          if (n==-1){
              return 0;
          }
          return 1+cut(a.substring(n+b.length()),b);
    }
}
